<template>
	<view class="con">
		<u-cell class="shopitem"  stop center :url="'/pages/goods_detail/main?goods_id='+shopItem.goods_id">	
			<view class="leftcon"  slot="icon">
				<view class="leftcheckbox" v-if="shoptype=='cartitem'"  @click.stop="checkboxChange">
					<icon :color="shopItem.goods_state?'green':'grey'" type="success" size="20"/>
				</view>
				<image class="leftimg"  mode="aspectFit" :src="shopItem.goods_small_logo||defaultPic"></image>
			</view>
			<view class="hahah" slot="value">
				<view class="rtit">{{shopItem.goods_name}}</view>
				<view class="rprice">
					<view>￥{{shopItem.goods_count?shopItem.goods_price*shopItem.goods_count:shopItem.goods_price}}</view>
					<view class="jinbu">
						<slot name="jinbu"></slot>
					</view>
				</view>
			</view>
		</u-cell>
	</view>
</template>

<script>
	export default {
		name:'shopitem', 
		props:{
			shopItem:{
				type:Object,
				required:true
			},
			shoptype:{
				type:String,
				default:'shopitem'
			},
		},
		data() {
			return {
				defaultPic: 'https://img3.doubanio.com/f/movie/8dd0c794499fe925ae2ae89ee30cd225750457b4/pics/movie/celebrity-default-medium.png',
				checkboxValue1:[],
				// 基本案列数据
				checkboxList1: [{
						name: '苹果',
						disabled: false
					},
					{
						name: '香蕉',
						disabled: false
					},
					{
						name: '橙子',
						disabled: false
					}
				],
			}
		},
		methods:{
			checkboxChange(){
				// this.goods_state=!this.shopItem.goods_state
				this.$set(this.shopItem,'goods_state',!this.shopItem.goods_state)
				this.$store.commit('seCheckbox',this.shopItem)
			}
		}
	}
</script>

<style>
.leftimg{
	width: 200rpx;
	height: 200rpx;
	max-heihgt:200rpx;
}
.shopitem{height: auto;}
.rtit{
	font-size: 28rpx;
	white-space: pre-wrap;
	width: 100%;
}
.rprice{
	color:rgb(195,21,20);
	font-size: 35rpx;
	display: flex;
	justify-content: space-between;
	margin-top: 25rpx;
}
.leftcon{
	display: flex;
	align-items: center;
}
.leftcheckbox{
	flex:1
}
.hahah{min-width:65%;position: relative;}
uni-scroll-view{
	flex-shrink:none;
}
/* 加载更多 */
.u-loadmore__content__text{
	line-height:inherit !important;
}

.jinbu{
	
	
}
</style>
